// WzDataExportAnimate.cpp: implementation of the CWzDataExportAnimate class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ansieditor.h"
#include "WzDataExportAnimate.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CWzDataExportAnimate::CWzDataExportAnimate()
{
	m_bAutoInsert = TRUE;
	m_nTimingBase = 200;
	m_nAnimateType = 0;
	m_sProlog = gpApp->m_mui.LoadString(IDS_DEFAULT_PROLOG);
	m_bGenerateProlog = TRUE;
	m_nFrameLineCount = 21;
	m_nMaxLineLen = 250;

	m_nAnimateType = gpApp->GetProfileInt("Dialog", "ExportAnimate.AnimateType", m_nAnimateType);
	m_nTimingBase = gpApp->GetProfileInt("Dialog", "ExportAnimate.TimingBase", m_nTimingBase);
	m_bAutoInsert = gpApp->GetProfileInt("Dialog", "ExportAnimate.AutoInsert", m_bAutoInsert);
	m_sProlog = gpApp->GetProfileString("Dialog", "ExportAnimate.FrameProlog", m_sProlog);
	m_bGenerateProlog = gpApp->GetProfileInt("Dialog", "ExportAnimate.GenerateProlog", m_bGenerateProlog);
	m_nFrameLineCount = gpApp->GetProfileInt("Dialog", "ExportAnimate.FrameLineCount", m_nFrameLineCount);
	m_nMaxLineLen = gpApp->GetProfileInt("Dialog", "ExportAnimate.MaxLineLen", m_nMaxLineLen);
}

CWzDataExportAnimate::~CWzDataExportAnimate()
{

}

void CWzDataExportAnimate::SaveState()
{
	//
	gpApp->WriteProfileInt("Dialog", "ExportAnimate.AnimateType", m_nAnimateType);
	gpApp->WriteProfileInt("Dialog", "ExportAnimate.TimingBase", m_nTimingBase);
	gpApp->WriteProfileInt("Dialog", "ExportAnimate.AutoInsert", m_bAutoInsert);
	gpApp->WriteProfileString("Dialog", "ExportAnimate.FrameProlog", m_sProlog);
	gpApp->WriteProfileInt("Dialog", "ExportAnimate.GenerateProlog", m_bGenerateProlog);
	gpApp->WriteProfileInt("Dialog", "ExportAnimate.FrameLineCount", m_nFrameLineCount);
	gpApp->WriteProfileInt("Dialog", "ExportAnimate.MaxLineLen", m_nMaxLineLen);
}
